package com.jiaoyou.baojian.http;

import com.jiaoyou.baojian.http.response.BaseResponse;

import java.io.File;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

/**
 * Created by DemonZYM on 17/5/5.
 */

public interface HttpService {
    @FormUrlEncoded
    @POST("/user/account/register")
    Call<BaseResponse> register(@Field("mobile")String mobile, @Field("password")String password, @Field("vcode")String vcode);

    @FormUrlEncoded
    @POST("/user/account/login")
    Call<BaseResponse> login(@Field("mobile")String mobile, @Field("password")String password, @Field("isRemember")boolean isRemember);

    @FormUrlEncoded
    @POST("/user/account/changePassword")
    Call<BaseResponse> changePassword(@Field("oldPassword")String oldPassword, @Field("newPassword")String newPassword);

    @FormUrlEncoded
    @POST("/user/account/vcodeLogin")
    Call<BaseResponse> vcodeLogin(@Field("mobile")String mobile, @Field("password")String password,
                                  @Field("vcode")String vcode,@Field("isRemember")boolean isRemember);

    @FormUrlEncoded
    @POST("/user/account/modifyUserInfo")
    Call<BaseResponse> modifyUserInfo(@Field("avatar")String avatar, @Field("imgs")String[] imgs,
                                      @Field("nickname")String nickname, @Field("sex")String sex,
                                      @Field("femaleType")String femaleType, @Field("birthday")String birthday,
                                      @Field("description")String description, @Field("costPerMin")int costPerMin);

    @GET("/user/account/detail/{userId}")
    Call<BaseResponse> getUserDetail(@Path("userId") long userId);

    @GET("/user/account/getUserInfoByImUserId")
    Call<BaseResponse> getUserInfoByImUserId(@Query("imUserId") String imUserId);

    @GET("/user/account/getUserInfo")
    Call<BaseResponse> getUserInfo();

    @GET("/user/account/detail/current")
    Call<BaseResponse> getCurrentUserInfo();

    @GET("/user/actress/types")
    Call<BaseResponse> getActressTypes();

    @FormUrlEncoded
    @POST("/user/actress/apply")
    Call<BaseResponse> applyActress(@Field("audioPath") String audioPath, @Field("type") String type, @Field("costPerMin") int costPerMin);

    @GET("/user/actress/list")
    Call<BaseResponse> getActressList(@Query("type") String type, @Query("pageNo") int pageNo, @Query("pageSize") int pageSize);

    @GET("/room/list")
    Call<BaseResponse> getRoomList(@Query("pageNo")int pageNo, @Query("pageSize")int pageSize);

    @GET("/rank/list")
    Call<BaseResponse> getRankList(@Query("rankType")String rankType, @Query("rankRange")String rankRange);

    @FormUrlEncoded
    @POST("/user/misc/feedback")
    Call<BaseResponse> feedback(@Field("content")String content);

    @Multipart
    @POST("/image/uploadWithPrefix")
    Call<BaseResponse> uploadImage(@Query("prefix") String prefix, @Part MultipartBody.Part imageFile);

    @POST("/user/misc/signin")
    Call<BaseResponse> signin(@Query("source")String source, @Query("token")String token);

    @FormUrlEncoded
    @POST("room/actress/create")
    Call<BaseResponse> roomCreate(@Field("voiceConferenceId")String voiceConferenceId, @Field("groupChatId")String groupChatId,
              @Field("img")String img, @Field("name")String name,
              @Field("description")String description, @Field("type")String type, @Field("fromUserId")long fromUserId);

    @FormUrlEncoded
    @POST("/room/actress/pickup")
    Call<BaseResponse> pickup(@Field("voiceConferenceId")String voiceConferenceId, @Field("groupChatId")String groupChatId,
                                  @Field("img")String img, @Field("name")String name,
                                  @Field("description")String description, @Field("type")String type, @Field("fromUserId")long fromUserId);

    @FormUrlEncoded
    @POST("/user/fav/fav")
    Call<BaseResponse> fav(@Field("favUserId")long favUserId);

    @GET("/user/fav/list/current")
    Call<BaseResponse> getMyFavList();

    @GET("/user/fav/list/{userId}")
    Call<BaseResponse> getFavList(@Path("userId") long userId);

    @GET("/user/fav/fans/list/current")
    Call<BaseResponse> getMyFansList();

    @GET("/user/fav/fans/list/{userId}")
    Call<BaseResponse> getFansList(@Path("userId") long userId);

    @GET("/user/card/index")
    Call<BaseResponse> getCardIndex();

    @GET("/user/card/getAvailable")
    Call<BaseResponse> getCardAvailable();

    @GET("/user/message/list")
    Call<BaseResponse> getMessageList(@Query("type") String type, @Query("pageNo") int pageNo, @Query("pageSize") int pageSize);

    @GET("/item/findByShopId")
    Call<BaseResponse> getItemListByShopId(@Query("shopId") long shopId);

    @GET("/gift/list")
    Call<BaseResponse> getGiftList();

    @FormUrlEncoded
    @POST("/gift/give")
    Call<BaseResponse> giveGift(@Field("toUserId")long toUserId, @Field("giftId")long giftId, @Field("quantity")int quantity);

    @FormUrlEncoded
    @POST("/room/user/giveGift")
    Call<BaseResponse> roomGiveGift(@Field("roomId")long roomId, @Field("giftId")long giftId, @Field("quantity")int quantity);

    @FormUrlEncoded
    @POST("/gift/giveList")
    Call<BaseResponse> giveGifts(@Field("toUserId")long toUserId, @Field("giftList")String giftList);

    @FormUrlEncoded
    @POST("room/user/giveGiftList")
    Call<BaseResponse> roomGiveGifts(@Field("roomId")long toUserId, @Field("giftList")String giftList);

    @GET("/setting/global")
    Call<BaseResponse> getGlobalSetting();

    @POST("/room/user/call")
    Call<BaseResponse> roomCall(@Query("callee") String callee);

    @POST("/v1/room/user/call")
    Call<BaseResponse> roomCallv1(@Query("callee") String callee);

    @GET("/room/agora/key/channel")
    Call<BaseResponse> getRoomKey(@Query("userId") String userId, @Query("channelName")String channelName);

    @GET("/room/agora/key/signaling")
    Call<BaseResponse> getLoginKey(@Query("userId") String userId);

    @POST("/room/actress/charge")
    Call<BaseResponse> actressCharge();

    @FormUrlEncoded
    @POST("/room/actress/exit")
    Call<BaseResponse> exitRoom(@Field("type")String type);

    @FormUrlEncoded
    @POST("/room/actress/hangup")
    Call<BaseResponse> hangup(@Field("type")String type);

    @GET("/room/user/check")
    Call<BaseResponse> checkCard();

    @GET("/vcode/sms/register/send")
    Call<BaseResponse> sendSMS(@Query("mobile") String mobile);

    @GET("/vcode/sms/login/send")
    Call<BaseResponse> sendLoginSMS(@Query("mobile") String mobile);

    @FormUrlEncoded
    @POST("/trade/submit")
    Call<BaseResponse> tradeSubmit(@Field("skuId")long skuId, @Field("quantity")int quantity);

    @FormUrlEncoded
    @POST("/trade/pay")
    Call<BaseResponse> tradePay(@Field("tids")long[] tids);

    @FormUrlEncoded
    @POST("/payment/appPayment/appAlipay")
    Call<BaseResponse> appAlipay(@Field("paymentId")String paymentId);

    @FormUrlEncoded
    @POST("/user/account/outer/bind")
    Call<BaseResponse> outerBind(@Field("type")String type, @Field("outerId")String outerId,
                                 @Field("realname")String realname, @Field("nickname")String nickname,
                                 @Field("avatar")String avatar, @Field("url")String url,
                                 @Field("gender")String gender, @Field("address")String address,
                                 @Field("province")String province, @Field("city")String city);

    @FormUrlEncoded
    @POST("/room/user/enter")
    Call<BaseResponse> enterRoom(@Field("roomId")long roomId);

    @FormUrlEncoded
    @POST("/room/actress/heartbeat")
    Call<BaseResponse> roomHeartbeatZhubo(@Field("roomId")long roomId);

    @FormUrlEncoded
    @POST("/room/user/heartbeat")
    Call<BaseResponse> roomHeartbeatUser(@Field("roomId")long roomId);

    @FormUrlEncoded
    @POST("/room/user/exit")
    Call<BaseResponse> exitRoom(@Field("roomId")long roomId);

    @POST("/room/user/hangup")
    Call<BaseResponse> hangup();

    @POST("/withdraw/apply")
    Call<BaseResponse> withdrawApply(@Query("amount") float amount, @Query("type") String type);
}
